package com.cloud.wms.config;

/**
 * Created by Tanghaibo
 * 2018/3/22
 * description: http请求配置信息类
 */

public interface HttpConfig {

    long CONNECT_TIMEOUT = 10 * 1000;   //连接超时时长

    long IO_READ_TIMEOUT = 60 * 1000;   //读超时时长

    long IO_WRITE_TIMEOUT = 60 * 1000;  //写超时时长

    String HTTP_HEADER_CONTENT_TYPE_KEY = "Content-Type";

    String HTTP_HEADER_CONTENT_TYPE_VALUE = "application/json";

    String HTTP_HEADER_DOWNLOAD_APK_KEY = "download_apk";   //下载文件请求头标识

    String HTTP_HEADER_TOKEN_KEY = "X-FC-Token";    //请求头 Token key

    String HTTP_HEADER_SIGN_KEY = "X-FC-Sign";      //请求头 Sign key

    String HTTP_HEADER_SIGN_VALUE = "Bg618qUociXAmxYhecLxVE+RdA1C5CkGXYBnJGE229o=";//请求头 Sign value

    String HTTP_HEADER_FROM_KEY = "From";       //请求头 来源 key

    String HTTP_HEADER_FROM_VALUE = "Android";  //请求头 来源 value

    // MES请求验签规则
    String HTTP_HEADER_MEMBER_KEY = "PartnerId";    //请求头 会员 key

    String HTTP_HEADER_WAREHOUSE_KEY = "WareHouseID";      //请求头 仓库 key

    String HTTP_HEADER_TIME_KEY = "TimeStamp";//请求头 时间戳

    String HTTP_HEADER_MES_SIGN_KEY = "Sign";//请求头 Sign value

    int OPERATOR_ID = 1;     //operatorId
    int CREATE_BY = 2;  //CreateBy
    int USER_ID = 3;
    int USER_ID_UP = 4;

    /**
     * 网络请求错误code码
     */
    enum HttpErrorCode {
        OVERDUE("TOKEN_NOT_EXIST");

        HttpErrorCode(String code) {
            this.code = code;
        }

        public String getCode() {
            return code;
        }

        private String code;
    }

    /**
     * 网络请求错误code码
     */
    enum SystemType {
        IMES("IMES"),
        WMS("WMS");

        SystemType(String code) {
            this.code = code;
        }

        public String getCode() {
            return code;
        }

        private String code;
    }
}
